from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from merchant.apps.categories.models import *

def category_detail(request, slug, category_slug):
	category = get_object_or_404(Category, hierarchy__slug=slug, slug_path="/%s" % category_slug)
	return render_to_response('categories/category_detail.html',
		{'category' : category},
		context_instance=RequestContext(request)
	)
